/*2、随机生成20以内的20个非0正整数，打印出来。对生成的数值，第单数个（不是索引）累加求和，第偶数个累乘求积。打印结果*/
package main

import "fmt"

func main() {
	var f1, f2, fn = 0, 0, 0
	for n := 1; n <= 100; n++ {
		if n == 1 {
			f1 = 1
			fmt.Printf("%v,", f1)
		} else if n == 2 {
			f2 = 1
			fmt.Printf("%v,", f2)
		} else {
			fn = f1 + f2
			f1 = f2
			f2 = fn
			if fn > 100 {
				break
			}
			fmt.Printf("%v,", fn)
		}
	}
}
